package componentes;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

@SuppressWarnings("serial")
public class JLabelText extends JLabel {


	//clase para unir un jlabel y un text field
	GridBagConstraints gbc;

	JLabel label;
	JTextField txtbox;
	ImageIcon bien,mal;
	
	
	public JLabelText (String lab){
	
		label = new JLabel(lab);
	    label.setLayout(new GridBagLayout());
	    
	    gbc = new GridBagConstraints(0, 0, 4, 1, 0, 0,
				GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(
						5, 5, 5, 5), 0, 0);
	
	    
		label.add(txtbox = new JTextField("hiii"),gbc);
		
	}
	
}
